<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="https://www.thymeleaf.org/">
<nav th:fragment="navHead()" class="menu-wrap" style="z-index: 150;background: url('/images/background/leaves_jungle.png')">
    <div class="menu" style="background: url('/images/background/log_oak.png')">
        <ul>
            <li id="dashboard">
                <a href="javascript:void(0)" onclick="toLink(getRootPath()+'admin/index')">
                    <i class="fa fa-dashboard fa-lg"></i>
                    <span class="nav-text">仪表盘</span>
                </a>
            </li>
            <li id="webOption">
                <a href="javascript:void(0)" onclick="toLink(getRootPath()+'admin/webOption')">
                    <i class="fa fa-cog fa-lg"></i>
                    <span class="nav-text">网站设置</span>
                </a>
            </li>
            <li id="userManager">
                <a href="javascript:void(0)" onclick="toLink(getRootPath()+'admin/userManager')">
                    <i class="fa fa-user fa-lg"></i>
                    <span class="nav-text">用户管理</span>
                </a>
            </li>
        </ul>
    </div>
</nav>

<div th:fragment="adminFood()">
    <span style="display: none" id="activeNav" th:text="${activeNav}"></span>
    <script type="text/javascript">
        $(function () {
            const activeNav = $("#activeNav").text();
            if (activeNav != null && activeNav !== "" && typeof activeNav != "undefined") {
                $("#" + activeNav).addClass("checkMenu");
            }
        })
    </script>
</div>
</html>